/ Assembly List / LJCNetCommon / LJCAssemblyReflect / SetTypeReference

Namespace - LJCNetCommon


Parameters
typeName - The fully qualified Type name.

Returns

The Type reference.

Syntax

C#
public Type SetTypeReference(String typeName)

Set the Type reference. (RE)

Remarks

Sets the TypeName property value and attempts to set the TypeReference property value if the assembly reference and type name exist.

Example

C#
using System;
using System.Reflection;
using LJC.Net.Common;

public Type RetrieveTypeReference(string assemblyFileSpec, string fullTypeName)
{
  Type retValue = null;

  // These calls are not required if an LJCAssemblyReflect reference is
  // used and the the following set methods have already been executed.
  LJCAssemblyReflect assemblyReflect = new LJCAssemblyReflect();
  Assembly assembly = assemblyReflect.SetAssembly(assemblyFileSpec);

  retValue = assemblyReflect.SetTypeReference(fullTypeName);
  return retValue;
}

Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.